//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Text;

namespace Eas.WebCrawler.Model.Gateway {
    internal class BaseWebResponse : Eas.WebCrawler.Interfaces.WebResponseInterface{
        public BaseWebResponse(System.Net.WebResponse webResponse) {
            _WebResponse = webResponse;
        }
        
        /// <summary>The underlying WebResponse</summary>
        /// <remarks>Backing field for the WebResponse property.</remarks>
        /// <seealso cref="WebResponse"/>
        private System.Net.WebResponse _WebResponse;

        /// <summary>The underlying WebResponse</summary>
        public System.Net.WebResponse WebResponse {
            get { return _WebResponse; }
        }

        #region WebResponseInterface Members

        public void Close() {
            _WebResponse.Close();
        }

        public System.IO.Stream GetResponseStream() {
            return _WebResponse.GetResponseStream();
        }

        public string ContentType {
            get { return _WebResponse.ContentType; }
        }

        public System.Net.WebHeaderCollection Headers {
            get { return _WebResponse.Headers; }
        }

        #endregion
    }
}
